Fencing off Go: Liveness and Safety for Channel-based Programming (extended version)
نویسندگان
چکیده
Go is a production-level statically typed programming languagewhose design features explicit message-passing primitives andlightweight threads, enabling (and encouraging) programmers todevelop concurrent systems where components interact throughcommunication more so than by lock-based shared memory con-currency. Go can only detect global deadlocks at runtime, but pro-vides no compile-time protection against all too common commu-nication mismatches or partial deadlocks.This work develops a static verification framework for livenessand safety in Go programs, able to detect communication errorsand partial deadlocks in a general class of realistic concurrent pro-grams, including those with dynamic channel creation, unboundedthread creation and recursion. Our approach infers from a Go pro-gram a faithful representation of its communication patterns as abehavioural type. By checking a syntactic restriction on channelusage, dubbed fencing, we ensure that programs are made up offinitely many different communication patterns that may be re-peated infinitely many times. This restriction allows us to imple-ment procedures to check for liveness and safety in types which inturn approximates liveness and safety in Go programs. We have im-plemented a type inference and liveness and safety checks in a tool-chain and tested it against publicly available Go programs. This isa revised version of a paper [31] that appeared in POPL 2017,see § 9 for details.
منابع مشابه
A Static Verification Framework for Message Passing in Go using Behavioural Types
The Go programming language has been heavily adopted in industry as a language that eiciently combines systems programming with concurrency. Go’s concurrency primitives, inspired by process calculi such as CCS and CSP, feature channel-based communication and lightweight threads, providing a distinct means of structuring concurrent software. Despite its popularity, the Go programming ecosystem o...
متن کاملCONTRAST: Computing Tradeoffs among Normative Multiagent System Specifications
We propose CONTRAST, a formal framework for comparing normative multiagent system (nMAS) specifications by computing tradeoffs among liveness (something good happens) and safety (nothing bad happens). Safety-focused specifications restrict agents’ actions to avoid undesired executions. However, such restrictions hinder liveness, particularly in situations such as medical emergencies. Moreover, ...
متن کاملAutomatic Translation from Combined B and CSP Specification to Java Programs
A recent contribution to the formal specification and verification of concurrent systems is the integration of the stateand event-based approaches B and CSP, specifically in the ProB model checking tool. At the implementation end of the development, concurrent programming in Java remains a demanding and error-prone activity, because of the need to verify critical properties of safety and livene...
متن کاملDraft – April 16 , 2013 Observing Progress Properties via Contextual Refinements ( Extended Version )
Implementations of concurrent objects should guarantee linearizability and a progress property such as wait-freedom, lock-freedom, obstruction-freedom, starvation-freedom, or deadlock-freedom. Conventional informal or semi-formal definitions of these progress properties describe conditions under which a method call is guaranteed to complete, but it is unclear how these definitions can be utiliz...
متن کاملA Two Stage Stochastic Programming Model of the Price Decision Problem in the Dual-channel Closed-loop Supply Chain
In this paper, we propose a new model for designing integrated forward/reverse logistics based on pricing policy in direct and indirect sales channel. The proposed model includes producers, disposal center, distributers and final customers. We assumed that the location of final customers is fixed. First, a deterministic mixed integer linear programming model is developed for integrated logistic...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- CoRR
دوره abs/1610.08843 شماره
صفحات -
تاریخ انتشار 2016